<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="../styles/css/css.css" rel="stylesheet" type="text/css"/>
<link href="../styles/css/main.css" rel="stylesheet" type="text/css" />
<link href="../styles/css/header.css" rel="stylesheet" type="text/css" />
<link href="../styles/css/css.css" rel="stylesheet" type="text/css">
<link href="../styles/css/login_center.css" rel="stylesheet" type="text/css" />
<script src="../scripts/jquery-1.7.2.js" type="text/javascript"></script>
<script type="text/javascript">
function ShowDiv(show_div,bg_div){
document.getElementById(show_div).style.display='block';
document.getElementById(bg_div).style.display='block' ;
var bgdiv = document.getElementById(bg_div);
bgdiv.style.width = document.body.scrollWidth;
// bgdiv.style.height = $(document).height();
$("#"+bg_div).height($(document).height());
};
//关闭弹出层
function CloseDiv(show_div,bg_div)
{
document.getElementById(show_div).style.display='none';
document.getElementById(bg_div).style.display='none';
};

$(function(){
	$("#select1").change(function(){
		var str = $("#select1").find("option:selected").text();
		$("#typeContext").val(str);
	});
});

function aprice(){
	var total=$(".account_div :text").eq(0).attr("value");
	var mina =$(".account_div :text").eq(1).attr("value");
	var price =$(".account_div :text").eq(2).attr("value");
	var money="";
	if(total == "" && mina ==""){
		alert("金额和分钟不能为空 .");
	}else{
		money=total/mina;
		$("#price").val(money.toFixed(2));
	}
}


</script>


</head>

<body>

<div class="header">
			<div class="header_container">
				<div class="logo1">
					<img src="../images/imgs/logo1.gif" />
				</div>
                <div class="login_right">
                	<div class="login_users"><span class="text12b">登录者：张三</span><span class="text12b"><a href="../login/login.html">登出</a></span></div>
                   <div class="login_js"><span class="text12b">角色：核心代理</span></div>
                </div>
			</div>
		</div>
		
        <div class="nav_bg">
			<div class="nav">
            	<ul>
                   	<li><a href="../openaccount/openaccount.jsp">申请开户</a></li>
                    <li><a href="../recharges/usersall.jsp" >账户充值</a></li>
                    <li><a href="login!findRechUsersAll" >查询用户信息</a></li>
                    <li><a href="../account/account.jsp" >查询账单信息</a></li>
                </ul>
            </div>
 			
		</div>

<div class="tablebg">
  <div class="tablecell1"><span class="text1">用户名称</span></div>
  <div class="tablecell2"><input type="text" class="input2" style="width:100px" /></div>
  <div class="table_button"><img src="../images/imgs/button-reset.gif" /></div>
  <div class="table_button"><img src="../images/imgs/button-search.gif" /></div>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="4" bgcolor="#4ac6f3"></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="0" background="../images/imgs/bg17.gif">
      <tr>
        <td width="100" height="27" class="text5"><div align="center">用户名</div></td>
        <td width="2"><img src="imgs/bg18.gif" width="2" height="27" /></td>
        <td width="63" class="text5"><div align="center">密码</div></td>
        <td width="117" class="text5"><div align="center">公司名称</div></td>
        <td width="113" class="text5"><div align="center">地址</div></td>
        <td width="78" class="text5"><div align="center">联系人</div></td>
        <td width="95" class="text5"><div align="center">联系方式</div></td>
        <td width="68" class="text5"><div align="center">邮编</div></td>
        <td width="120" class="text5"><div align="center">创建时间</div></td>
        <td width="113" class="text5"><div align="center">修改时间</div></td>
        <td width="73" class="text5"><div align="center">代理人</div></td>
        <td width="60" class="text5"><div align="center">角色</div></td>
        <td width="2"><img src="imgs/bg18.gif" width="2" height="27" /></td>
        <td width="80" class="text5"><div align="center">操作</div></td>
      </tr>
    </table></td>
  </tr>
  
  <s:iterator var="uall" value="#session.userAll">
  <tr>
    <td onmouseover="style.backgroundColor='#fdfce9'" onmouseout="style.backgroundColor='#ffffff'" bgcolor="#FFFFFF"><table width="100%" style="text-align: center;" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="2"><s:property value="#uall.id"/></td>
        <td width="101" height="27" class="text11"><s:property value="#uall.username"/>1</td>
        <td width="64" class="text5" style="max-height:64px" ><s:property value="#uall.password"/>1</td>
        <td width="117" class="text5"><s:property value="#uall.companyname"/>4</td>
        <td width="117" class="text5"><s:property value="#uall.address"/>3</td>
        <td width="79" class="text5"><s:property value="#uall.contact"/>5</td>
        <td width="98" class="text5"><s:property value="#uall.username"/>6</td>
        <td width="67" class="text5"><s:property value="#uall.username"/>1</td>
        <td width="122" class="text5"><s:property value="#uall.username"/>12</td>
        <td width="102" class="text5"><s:property value="#uall.createtime"/>3</td>
        <td width="73" class="text5"><s:property value="#uall.pdatetime"/>555</td>
        <td width="57" class="text5"><s:property value="#uall.username"/>1</td>

        <td width="1"></td>
        <td width="84" class="text11"><div align="center" id="p1"><a href="#" onclick="ShowDiv('popDiv','accountone')"/>充值</a></div></td>
      </tr>
    </table></td>
  </tr>
</s:iterator>
</table>
<div class="table_line"></div>
<div class="tablebg">
  <div class="table_button"><img src="../images/imgs/icon9.png" /></div>
  <div class="table_button"><input type="text" class="input2" style="width:20px" /></div>
  <div class="table_page"><span class="text1">共422条数据，显示43页，每页显示10条&nbsp;&nbsp;&nbsp;首页&nbsp;上一页&nbsp;下一页&nbsp;末页</span></div>
</div>
<div class="table_line"></div>

<!--账户充值层-->
<form action="account!dela.action" method="post">
<div class="accountone" id="accountone"></div>
<div class="account_div" id="popDiv" style="display:none; cursor: default;">
<div class="table_line"></div>
<div class="tablebg">
  <div class="table_title"><span class="text1">账户充值</span></div>
</div>
<div class="table_line"></div>
<div class="tablebg">
  <div class="tablecell2"><span class="text1">账户充值类型</span></div>
  <div class="tablecell2"><span class="text1"><select style="width:160px" id="select1">
  <option value="1">充值语音</option>
  <option value="2">充值短信</option>
  
  
  </select></span>
  <input  id="typeContext"  type="hidden" name="type" /> 
  </div>
  <div class="tablecell4"><span class="text4">*</span></div>
</div>
<div class="table_line"></div>
<div class="tablebg">
  <div class="tablecell1"><span class="text1">金额</span></div>
  <div class="tablecell2"><input type="text" class="input2" style="width:150px"  name="total"/></div>
  <div class="tablecell4"><span class="text4">*</span></div>
</div>
<div class="table_line"></div>
<div class="tablebg">
  <div class="tablecell1"><span class="text1">分钟</span></div>
  <div class="tablecell2"><input type="text" class="input2" style="width:150px"  name="min" onblur="aprice()"/></div>
  <div class="tablecell4"><span class="text4">*</span></div>
</div>
<div class="table_line"></div>
<div class="tablebg">
  <div class="tablecell1"><span class="text1">单价</span></div>
  <div class="tablecell2"><input type="text" class="input2" style="width:150px" value="0.2/分钟" disabled style="background:#ccc"  name="price" id="price" /></div>
</div>
<div class="table_line"></div>
<div class="table_line"></div>
<div class="tablebg">
  <div class="table_button"><img src="../images/imgs/button-close.gif" onclick="CloseDiv('popDiv','accountone')" /></div>
  <div class="table_button"><img src="../images/imgs/button-confirm.gif" width="68"/></div>
</div>
<div class="table_line"></div>
</div>
</form>
</body>
</html>
